package Demo04;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;

import javax.servlet.http.HttpServletRequest;

public class UserAction_ServletActionContext extends ActionSupport {
    @Override
    public String execute() throws Exception {
        //使用ServletActionContext类

        HttpServletRequest request= ServletActionContext.getRequest();

       String s= request.getParameter("username");
       String s1= request.getParameter("password");
        System.out.println(s+"  + "+s1);
        return NONE;
    }
}
